<script setup>
import { onMounted } from 'vue'
import NavBar from '@/layout/NavBar.vue'
import SideBar from '@/layout/SideBar.vue'
import { useUserStore } from '@/store/user'

const userStore = useUserStore()
onMounted(async () => {
  if (!userStore.userInfo) {
    await userStore.fetchUserInfo()
  }
})
</script>

<template>
  <router-view />
</template>

<style>
body {
  background: #F5F7FA;
}
.main-layout {
  display: flex;
  flex-direction: row;
  min-height: calc(100vh - 60px);
  width: 100%;
}
.main-content {
  flex: 1;
  min-width: 0;
  padding: 32px 24px;
  box-sizing: border-box;
  background: transparent;
}
.main-content-inner {
  width: 100%;
  margin: 0;
}
</style>
